﻿using FreeSql.DataAnnotations;
using Jumei.Common.BaseModel;
using System;

namespace Jumei.Model.Business.OrdersManage
{
    /// <summary>
    /// 订单物流表
    /// </summary>
    [Table(Name = "or_order_express")]
    [Index("idx_{tablename}_01", nameof(ExpressNo), false)]
    public class OrderExpressEntity : EntityFull, ITenant
    {
        /// <summary>
        /// 租户Id
        /// </summary>
        [Column(Position = -10)]
        public long? TenantId { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public long OrderId { get; set; }

        public OrdersEntity Orders { get; set; }

        /// <summary>
        /// 订单商品ID列表
        /// </summary>
        public long OrderGoodsId { get; set; }

        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? DeliveryTime { get; set; }

        /// <summary>
        /// 发货方式
        /// true  使用物流 
        /// false 未用物流
        /// </summary>
        public bool IsExpress { get; set; } = false;

        /// <summary>
        /// 快递商ID
        /// </summary>
        public long ExpressId { get; set; }

        /// <summary>
        /// 快递号
        /// </summary>
        [Column(StringLength = 20)]
        public string ExpressNo { get; set; }

        /// <summary>
        /// 发货类型标志 
        /// 0:手工发货 
        /// 1：导入excel发货
        /// </summary>
        public int DeliverType { get; set; } = 0;
    }
}
